package com.hhf.cloud.apis;

import com.hhf.cloud.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Daniel-黄海峰
 * @Description
 * @create 2024/3/2 15:17
 */
@FeignClient(value = "seata-storage-service")
public interface StorageFeignApi {
    /**
     * 扣减库存AT
     */
    @PostMapping(value = "/storage/decrease")
    ResultData decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);

    @PostMapping(value = "/storage/decreasetcc")
    ResultData decreaseTcc(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
    }

